package com.subang.function.service.impl;

import java.util.List;
import com.subang.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.subang.function.mapper.SbCurrentPoliticsQuestionMapper;
import com.subang.function.domain.SbCurrentPoliticsQuestion;
import com.subang.function.service.ISbCurrentPoliticsQuestionService;

/**
 * 时政热点题Service业务层处理
 * 
 * @author subei
 * @date 2025-03-25
 */
@Service
public class SbCurrentPoliticsQuestionServiceImpl implements ISbCurrentPoliticsQuestionService 
{
    @Autowired
    private SbCurrentPoliticsQuestionMapper sbCurrentPoliticsQuestionMapper;

    /**
     * 查询时政热点题
     * 
     * @param id 时政热点题主键
     * @return 时政热点题
     */
    @Override
    public SbCurrentPoliticsQuestion selectSbCurrentPoliticsQuestionById(Long id)
    {
        return sbCurrentPoliticsQuestionMapper.selectSbCurrentPoliticsQuestionById(id);
    }

    /**
     * 查询时政热点题列表
     * 
     * @param sbCurrentPoliticsQuestion 时政热点题
     * @return 时政热点题
     */
    @Override
    public List<SbCurrentPoliticsQuestion> selectSbCurrentPoliticsQuestionList(SbCurrentPoliticsQuestion sbCurrentPoliticsQuestion)
    {
        return sbCurrentPoliticsQuestionMapper.selectSbCurrentPoliticsQuestionList(sbCurrentPoliticsQuestion);
    }

    /**
     * 新增时政热点题
     * 
     * @param sbCurrentPoliticsQuestion 时政热点题
     * @return 结果
     */
    @Override
    public int insertSbCurrentPoliticsQuestion(SbCurrentPoliticsQuestion sbCurrentPoliticsQuestion)
    {
        sbCurrentPoliticsQuestion.setCreateTime(DateUtils.getNowDate());
        return sbCurrentPoliticsQuestionMapper.insertSbCurrentPoliticsQuestion(sbCurrentPoliticsQuestion);
    }

    /**
     * 修改时政热点题
     * 
     * @param sbCurrentPoliticsQuestion 时政热点题
     * @return 结果
     */
    @Override
    public int updateSbCurrentPoliticsQuestion(SbCurrentPoliticsQuestion sbCurrentPoliticsQuestion)
    {
        sbCurrentPoliticsQuestion.setUpdateTime(DateUtils.getNowDate());
        return sbCurrentPoliticsQuestionMapper.updateSbCurrentPoliticsQuestion(sbCurrentPoliticsQuestion);
    }

    /**
     * 批量删除时政热点题
     * 
     * @param ids 需要删除的时政热点题主键
     * @return 结果
     */
    @Override
    public int deleteSbCurrentPoliticsQuestionByIds(Long[] ids)
    {
        return sbCurrentPoliticsQuestionMapper.deleteSbCurrentPoliticsQuestionByIds(ids);
    }

    /**
     * 删除时政热点题信息
     * 
     * @param id 时政热点题主键
     * @return 结果
     */
    @Override
    public int deleteSbCurrentPoliticsQuestionById(Long id)
    {
        return sbCurrentPoliticsQuestionMapper.deleteSbCurrentPoliticsQuestionById(id);
    }
}
